namespace RBAC.Read.Api.Application.Command.Approval
{
    using MediatR;
    using RBAC.ErrorCode;
    using RBAC.Read.Api.Application.Dto.Approval;

    /// <summary>
    /// 获取审批流程列表命令
    /// </summary>
    public class GetApprovalProcessListCommand : IRequest<APIPaging<ApprovalProcessListDto>>
    {
        /// <summary>
        /// 页码（从1开始）
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 流程名称（模糊查询）
        /// </summary>
        public string? ProcessName { get; set; }

        /// <summary>
        /// 流程类型（采购订单/销售订单/入库单/出库单等）
        /// </summary>
        public string? ProcessType { get; set; }

        /// <summary>
        /// 流程状态（0:禁用 1:启用）
        /// </summary>
        public int? Status { get; set; }

        /// <summary>
        /// 排序，默认按创建时间倒序
        /// </summary>
        public string OrderBy { get; set; } = "CreateTime DESC";
    }
}
